﻿#include <boost/json.hpp>
#include <iostream>
#include "http_server.h"
#include "http_client.h"
#include "util.h"
#include "util_thread.h"
#include "third/add_dll/include/library.h"
// #include "http_sync.h"



int main() {
    // hello();
    // start_main();
    // std::string content=http_client::get("http://10.168.10.25:81/iframe/views/index.html").body;
    // const char * c_str = content.c_str();
    // std::cout << content<<std::endl;

    // Product p = {101, "Laptop", 999.99};
    // json::value jv = json::value_from(p);
    // json::object j_obj = jv.as_object();
    // std::cout << json::serialize(j_obj) << std::endl;

    // Product p2 = json::value_to<Product>(json::parse( json::serialize(j_obj)));


    std::thread consumer([](){
       try {
           thread_main();
       } catch (const std::exception& e) {
            std::cerr << "Exception in consumer thread: " << e.what() << std::endl;
       }
    });
    consumer.join();
    return 0;
}
